home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Palettes
/
PSAction
/
palette.make_3.0
< prev
next >
Wrap
Text File
|
1995-06-12
|
3KB
|
95 lines
#
# palette.make
#
# Inputs from Makefile.preamble or Makefile.postamble (no defaults):
# OTHER_CFLAGS - Flags passed to compiler (in addition to -g, -O, etc.)
# OTHER_LDFLAGS - Flags passed to ld (in addition to -ObjC, etc.)
# OTHER_OFILES - Additional relocatables that may be linked in
# OTHER_PRODUCT_DEPENDS - Other dependencies of this project
# OTHER_SOURCEFILES - Other source files maintained by .pre/postamble
# OTHER_GARBAGE - Additional files to be removed by make 'clean'
#
# DSTROOT - Virtual root directory prepended to $(INSTALLDIR)
#
# Inputs from Makefile.preamble (no defaults):
# PRECOMPS - Precompiled headers that should be built before compilation
# OTHER_INITIAL_TARGETS - Targets to be built before subprojects, etc.
#
# Inputs from Makefile.postamble (with defaults set in common.make):
# MAKEFILES - Makefiles this project depends on (default = Makefile)
# DEFAULT_CFLAGS - Set of CFLAGS used in compiling (default set below)
#
# Inputs from Makefile (avoid setting these, ProjectBuilder controls them):
# NAME - name of application
# LANGUAGE - langage in which the project is written (default "English")
# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
# GLOBAL_RESOURCES - non-localized resources of project
#
# CLASSES - Class implementation files in project.
# HFILES - Header files in project.
# MFILES - Other Objective-C source files in project.
# CFILES - Other C source files in project.
# PSWFILES - .psw files in the project
# PSWMFILES - .pswm files in the project
# SUBPROJECTS - Subprojects of this project
# BUNDLES - Bundle subprojects of this project
# OTHERSRCS - Other miscellaneous sources of this project
# OTHERLINKED - Source files not matching a standard source extention
# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
# MAKEFILEDIR - Directory in which to find this generic set of Makefiles
#
#
# Outputs to common.make:
# OFILE_DIR
# DERIVED_FILES
# PRODUCT_ROOT
OFILE_DIR = obj
DERIVED_FILES = $(NAME) $(OFILE_DIR)
PRODUCT_ROOT = $(NAME).palette
CFLAGS = -g -O -Wall # palettes are standalone, so this must be set
DEFAULT_CFLAGS = $(CFLAGS) $(OTHER_CFLAGS)
include $(MAKEFILEDIR)/common.make
# Rewrite various rules to simulate a 'debug' for the standalone case
.c.o:
$(CC) $(DEFAULT_CFLAGS) -c $*.c -o $(OFILE_DIR)/$*.o
.m.o:
$(CC) $(DEFAULT_CFLAGS) $(OBJCFLAGS) -c $*.m -o $(OFILE_DIR)/$*.o
.psw.o:
$(PSWRAP) $(PSWFLAGS) -a -h $*.h -o $*.c $*.psw
$(CC) $(DEFAULT_CFLAGS) -c $*.c -o $(OFILE_DIR)/$*.o
.pswm.o:
$(PSWRAP) $(PSWFLAGS) -a -h $*.h -o $*.m $*.pswm
$(CC) $(DEFAULT_CFLAGS) $(OBJCFLAGS) -c $*.m -o $(OFILE_DIR)/$*.o
all:: project
project:: $(INITIAL_TARGETS) subcomponents resources $(PRODUCT_ROOT)/$(NAME)
$(PRODUCT_ROOT):
@$(MKDIRS) $(PRODUCT_ROOT)
$(PRODUCT_ROOT)/$(NAME): $(OFILE_DIR) $(PRODUCT_DEPENDS) $(PRODUCT_ROOT)
$(LD) -r $(PALETTELDFLAGS) -o $(PRODUCT_ROOT)/$(NAME) $(OFILES) $(OTHER_OFILES) $(OTHERLINKED)
$(CHMOD) a+x $(PRODUCT_ROOT)/$(NAME)
$(DSTROOT)$(INSTALLDIR):
@$(MKDIRS) $(DSTROOT)$(INSTALLDIR)
before_install:: $(DSTROOT)$(INSTALLDIR)
$(RM) -rf $(DSTROOT)$(INSTALLDIR)/$(PRODUCT_ROOT)
after_install::
install:: $(PRODUCT_ROOT) before_install $(OTHER_INSTALL_DEPENDS)
$(TAR) cf - $(PRODUCT_ROOT) | (cd $(DSTROOT)$(INSTALLDIR); $(TAR) xf -)
@$(MAKE) after_install
depend:: Makefile.dependencies $(SUBPROJECTS:.subproj=.depend) $(BUNDLES:.bproj=.depend)